package com.xinggq.auth.api.dto.login;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 认证中心用户信息安全的DTO
 *
 * @author xinggq
 * @since 2024-10-20
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(description = "用户信息")
public class AuthSafeUserInfoDTO {

  @Schema(description = "用户ID")
  private Long userId;

  @Schema(description = "用户名")
  private String username;

  @Schema(description = "租户ID")
  private Long tenantId;

  @Schema(description = "最后登录时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime lastLoginTime;
}